
require './resources/lua/viewports/passes/geometry'
require './resources/lua/viewports/passes/lighting'
require './resources/lua/viewports/passes/anti_alias'
require './resources/lua/viewports/passes/bloom'

class 'deferred_viewport' (rainbow.viewport)

function deferred_viewport:__init( )
	rainbow.viewport.__init( self )
	
	self:add_pass( 'geometry_pass', deferred_geometry_pass( ) )
	self:add_pass( 'lighting_pass', deferred_lighting_pass( ) )
	self:add_pass( 'anti_alias_pass', deferred_anti_alias_pass( ) )
	self:add_pass( 'bloom_pass', deferred_bloom_pass( ) )
	
	-- self:add_pass( 'geometry_pass', deferred_geometry_pass( ) )
end

--[[
Triggers this viewport to find all of the objects it would like to draw for each pass.
@param step_fraction How far between logic updates this frame is.
@param stack The viewport stack to add any additional required viewports to.
\author Sean Tromans
]]--
function deferred_viewport:build_render_queue( step_fraction, stack )
	-- print( "deferred_viewport:build_render_queue" )
end

--[[
Informs the viewport that all dependencies have been met and it is now time to draw each of its passes.
@param step_fraction How far between logic updates this frame is.
\author Sean Tromans
]]--
function deferred_viewport:draw( step_fraction )
	-- print( "deferred_viewport:draw" )
end
